package com.qfedu.fmmall.dao;

import com.qfedu.fmmall.entity.Category;
import com.qfedu.fmmall.entity.ProductVO;
import com.qfedu.fmmall.general.GeneralDAO;
import com.qfedu.fmmall.entity.CategoryVO;
import org.springframework.stereotype.Repository;

import java.util.List;

public interface CategoryMapper extends GeneralDAO<Category> {
    /**
     * 1.连接查询
     *
     * @return
     */
    List<CategoryVO> selectAllCategories();

    /**
     * 2.子查询
     *
     * @param parentId
     * @return
     */
    List<CategoryVO> selectAllCategories2(int parentId);

    /**
     * 3. 查询一级类别
     * @return
     */
    List<CategoryVO> selectFirstLevelCategories();

}